/**
 * Copyright (C), 2015-2019, XXX有限公司
 * FileName: AuthServiceClient
 * Author:   zhouheng
 * Date:     2019/3/31 21:06
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.onesquare.user.client;

import com.onesquare.user.client.hystrix.AuthServiceHystrix;
import com.onesquare.user.pojo.Jwt;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 〈一句话功能简述〉<br> 
 * 〈〉
 *
 * @author zhouheng
 * @create 2019/3/31
 * @since 1.0.0
 */

@FeignClient(value = "os-uaa",fallback = AuthServiceHystrix.class )
public interface AuthServiceClient {
    @PostMapping(value = "/oauth/token")
    Jwt getToken(@RequestHeader(value = "Authorization") String authorization, @RequestParam("grant_type") String type,
                 @RequestParam("username") String username, @RequestParam("password") String password);

}